From 07d4e54cc6f32421aae976bd797a9dd9943e0ada Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Tue, 8 Jan 2002 19:21:55 +0000 Subject: [PATCH] Fix problem where child->requisition was accessed directly instead of Tue Jan 8 14:19:43 2002 Owen Taylor * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): Fix problem where child->requisition was accessed directly instead of calling get_child_requisition() (#68199, Damon Chaplin) --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtkcheckbutton.c | 7 +++++-- 8 files changed, 54 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 4b949c6114..ced0d903b8 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Tue Jan 8 14:19:43 2002 Owen Taylor + + * gtk/gtkcheckbutton.c (gtk_check_button_size_allocate): + Fix problem where child->requisition was accessed + directly instead of calling get_child_requisition() + (#68199, Damon Chaplin) + 2001-01-08 James Henstridge * gtk/gtkstyle.c: add trailing */ on doc comment. diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index d124836328..9f6f76fcea 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -299,14 +299,17 @@ gtk_check_button_size_allocate (GtkWidget *widget, if (GTK_BIN (button)->child && GTK_WIDGET_VISIBLE (GTK_BIN (button)->child)) { + GtkRequisition child_requisition; gint border_width = GTK_CONTAINER (widget)->border_width; + + gtk_widget_get_child_requisition (GTK_BIN (button)->child, &child_requisition); - child_allocation.width = MIN (GTK_BIN (button)->child->requisition.width, + child_allocation.width = MIN (child_requisition.width, allocation->width - ((border_width + focus_width + focus_pad) * 2 + indicator_size + indicator_spacing * 3)); - child_allocation.height = MIN (GTK_BIN (button)->child->requisition.height, + child_allocation.height = MIN (child_requisition.height, allocation->height - (border_width + focus_width + focus_pad) * 2); child_allocation.x = (border_width + indicator_size + indicator_spacing * 3 + widget->allocation.x + focus_width + focus_pad); -- 2.30.2